/var/ping-check/:
   file.directory:
    - makedirs: True
    - order: 1
/etc/ChinaCache/app.d/cpispm.amr:
   file.managed:
     - source: salt://PBL/nodeM/cpispm.amr
     - mode: 644
     - backup: minion
{% for sc in  'ping-PBL-reachable.sh','cpispm.sh' %} 
{{ sc }}:
   file.managed:
    - name: /var/ping-check/{{ sc }} 
    - source: salt://PBL/nodeM/{{ sc }}
    - mode: 755  
    - backup: minion 
{% endfor %}
amr: 
   cmd.wait:
     - name:  ccamr restart amr
     - cwd:  /root
     - watch:
        - file: /etc/ChinaCache/app.d/cpispm.amr
